Skip to content

feat(yhub): migrate versioning client to upstream yhub API - #2979

Open
nperez0111 wants to merge 1 commit into
mainfrom
feat/docker-url-update
Open

feat(yhub): migrate versioning client to upstream yhub API#2979
nperez0111 wants to merge 1 commit into
mainfrom
feat/docker-url-update

Conversation

@nperez0111

Copy link
Copy Markdown
Contributor

Summary

Migrate the YHub versioning client and example to the upstream yjs/yhub API (v0.3.0+), which introduced versioned URL paths and new response shapes.

Rationale

The upstream yhub server has introduced breaking API changes (versioned URL paths, wrapped activity responses, renamed changeset fields). This PR updates the BlockNote client to match, so it works against the current upstream yhub.

Changes

  • URL paths: /{endpoint}/{org}/{docId}/{endpoint}/v1/{org}/{docId} (the baseUrl option now includes the API prefix, e.g. https://yhub.example.com/api)
  • Activity response: unwrap from { activity: [...] } wrapper (3 call sites)
  • Changeset response: prevDoc/nextDoc replaced with ydoc
  • PATCH userid: moved from ignored ?userid= query param to by field in request body
  • Rollback: removed redundant ?from= query param (body-only)
  • WebSocket path: updated to /api/ws/v1 in the example
  • Tests: all 29 yhub tests updated to match new response shapes and URL paths

Impact

Breaking change for baseUrl — callers must now include the API prefix (e.g. /api) in their baseUrl. The versioning example is updated accordingly.

Testing

  • All 29 unit tests in yhub.test.ts pass
  • End-to-end tested against a local yhub-standalone Docker container: PATCH, activity, changeset, rollback, and mergeUsers all verified working with the new API shapes

Checklist

  • Code follows the project's coding standards.
  • Unit tests covering the new feature have been added.
  • All existing tests pass.
  • The documentation has been updated to reflect the new feature

Update the YHub versioning endpoints to match the upstream yjs/yhub API
(v0.3.0+), which introduced versioned URL paths and new response shapes.
@vercel

vercel Bot commented Aug 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
blocknote Ready Ready Preview Aug 17, 2026 1:34pm
blocknote-website Ready Ready Preview Aug 17, 2026 1:34pm

Request Review

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

An error occurred during the review process. Please try again later.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Aug 17, 2026

Copy link
Copy Markdown

Open in StackBlitz

@blocknote/ariakit

npm i https://pkg.pr.new/@blocknote/ariakit@2979

@blocknote/code-block

npm i https://pkg.pr.new/@blocknote/code-block@2979

@blocknote/core

npm i https://pkg.pr.new/@blocknote/core@2979

@blocknote/diagram-block

npm i https://pkg.pr.new/@blocknote/diagram-block@2979

@blocknote/mantine

npm i https://pkg.pr.new/@blocknote/mantine@2979

@blocknote/math-block

npm i https://pkg.pr.new/@blocknote/math-block@2979

@blocknote/react

npm i https://pkg.pr.new/@blocknote/react@2979

@blocknote/server-util

npm i https://pkg.pr.new/@blocknote/server-util@2979

@blocknote/shadcn

npm i https://pkg.pr.new/@blocknote/shadcn@2979

@blocknote/xl-ai

npm i https://pkg.pr.new/@blocknote/xl-ai@2979

@blocknote/xl-docx-exporter

npm i https://pkg.pr.new/@blocknote/xl-docx-exporter@2979

@blocknote/xl-email-exporter

npm i https://pkg.pr.new/@blocknote/xl-email-exporter@2979

@blocknote/xl-multi-column

npm i https://pkg.pr.new/@blocknote/xl-multi-column@2979

@blocknote/xl-odt-exporter

npm i https://pkg.pr.new/@blocknote/xl-odt-exporter@2979

@blocknote/xl-pdf-exporter

npm i https://pkg.pr.new/@blocknote/xl-pdf-exporter@2979

commit: f63fa54

@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://TypeCellOS.github.io/BlockNote/pr-preview/pr-2979/

Built to branch gh-pages at 2026-08-17 13:37 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant